with v8.Class_Data, v8.Class_Value, v8.Class_Function_Template;
package v8.Class_Type_Switch is
   type Type_Switch (<>) is new v8.Class_Data.Data with private;
   type Pointer is access all Type_Switch;
   -- A utility for determining the type of objects based on the template
   -- they were constructed from.


   function Create (a_type : v8.Class_Function_Template.Pointer) return Pointer;

   function Create (types : v8.Class_Function_Template.Function_Template_Array) return Pointer;

   function Match (this : in out Type_Switch; value : v8.Class_Value.Pointer) return int;


private
   type Type_Switch is new v8.Class_Data.Data with null record;

   pragma Import (CPP, Match, "_ZN2v810TypeSwitch5matchENS_6HandleINS_5ValueEEE");

end v8.Class_Type_Switch;
